package domain.web.model;

import java.util.List;

/**
 * @author tvo35
 * 
 */

public class CategoryF {
	private long id;
	private String name;
	private List<CategoryF> children;
	private String uri;

	private String name_vi;
	private String name_en;

	public CategoryF() {
	}

	public CategoryF(long id, String name, String ontoClassUri, List<CategoryF> children) {
		this.id = id;
		this.name = name;
		this.uri = ontoClassUri;
		this.children = children;

		this.name_vi = "";
		this.name_en = "";
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<CategoryF> getChildren() {
		return children;
	}

	public void setChildren(List<CategoryF> children) {
		this.children = children;
	}

	public String getUri() {
		return uri;
	}

	public void setUri(String uri) {
		this.uri = uri;
	}

	public String getName_vi() {
		return name_vi;
	}

	public void setName_vi(String name_vi) {
		this.name_vi = name_vi;
	}

	public String getName_en() {
		return name_en;
	}

	public void setName_en(String name_en) {
		this.name_en = name_en;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id ^ (id >>> 32));
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((name_en == null) ? 0 : name_en.hashCode());
		result = prime * result + ((name_vi == null) ? 0 : name_vi.hashCode());
		result = prime * result + ((uri == null) ? 0 : uri.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CategoryF other = (CategoryF) obj;
		if (id != other.id)
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (name_en == null) {
			if (other.name_en != null)
				return false;
		} else if (!name_en.equals(other.name_en))
			return false;
		if (name_vi == null) {
			if (other.name_vi != null)
				return false;
		} else if (!name_vi.equals(other.name_vi))
			return false;
		if (uri == null) {
			if (other.uri != null)
				return false;
		} else if (!uri.equals(other.uri))
			return false;
		return true;
	}

}
